SRCDIR = ./
TARGET = acpb
OBJS = $(TARGET).o
SRC = $(SRCDIR)hl_md5.cpp $(SRCDIR)hl_md5wrapper.cpp $(SRCDIR)HyperTextTransfer.cpp $(SRCDIR)Socket.cpp $(SRCDIR)IniParser.cpp $(SRCDIR)IniDictionary.cpp $(SRCDIR)Main.cpp
INCLUDEDIR = -I/usr/local/include -I../include -I/usr/include
CPPFLAGS = -g -O2 -I$(INCLUDEDIR) -fexceptions -Wno-deprecated \
	   -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE

all: $(TARGET)

$(TARGET): $(SRC:.cpp=.o)
	$(CXX) $(CPPFLAGS) $(INCLUDEDIR) $^ $(LDLIBS) -o $@
		
clean:
	rm -Rf $(SRCDIR)*.o $(SRCDIR)*~ $(SRCDIR)core $(SRCDIR).depend
	rm -Rf *.o *~ core .depend $(TARGET)

distclean:
	rm -Rf $(SRCDIR)*.o $(SRCDIR)*~ $(SRCDIR)core $(SRCDIR).depend
	rm -Rf *.o *~ core .depend $(TARGET)
	rm -f config.* Makefile acpb
